// https://www.luogu.com.cn/problem/P1601

#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <string>
using namespace std;

string add(string str1, string str2) {
    if (str1.length() < str2.length()) {
        swap(str1, str2);
    }

    int add = 0;
    string ans;
    int t1 = str1.length() - 1;
    int t2 = str2.length() - 1;
    for (int i = 0; i < str2.length(); i++) {
        int tmp = str1[t1] - '0' + str2[t2] - '0' + add;
        add = tmp / 10;
        tmp %= 10;
        --t1, --t2;
        ans.push_back(tmp + '0');
    }

    while (t1 >= 0) {
        int tmp = str1[t1] - '0' + add;
        add = tmp / 10;
        tmp %= 10;
        --t1;
        ans.push_back(tmp + '0');
    }

    if (add) {
        ans.push_back('1');
    }

    reverse(ans.begin(), ans.end());
    return ans;
}

int main() {
    string str1, str2;
    cin >> str1 >> str2;
    add(str1, str2);
    return 0;
}